package com.woniuxuexi03;

import java.util.Scanner;
public class Test01 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入字符串");
        String str = sc.next();
        int daxie=0,xiaoxie=0,shuzi=0;
        for (int i = 0; i < str.length(); i++) {
            //提取字符串光标下的字符
            char ch = str.charAt(i);
            //判断字符是否是大写
            if(Character.isUpperCase(ch)){
                daxie ++;
                //判断字符是否是小写
            }else if(Character.isLowerCase(ch)){
                xiaoxie ++;
                //判断字符是否是数字
            }else if(Character.isDigit(ch)){
                shuzi++;
            }
        }
        System.out.println("大写字母有"+daxie+"个");
        System.out.println("小写字母有"+xiaoxie+"个");
        System.out.println("数字有"+shuzi+"个");
    }
}
